<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>Front End (GNU Compiler Collection (GCC) Internals)</title>

<meta name="description" content="Front End (GNU Compiler Collection (GCC) Internals)">
<meta name="keywords" content="Front End (GNU Compiler Collection (GCC) Internals)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Option-Index.html" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="gcc-Directory.html" rel="up" title="gcc Directory">
<link href="Back-End.html" rel="next" title="Back End">
<link href="Documentation.html" rel="prev" title="Documentation">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
ul.mark-bullet {list-style-type: disc}
-->
</style>


</head>

<body lang="en">
<div class="subsection-level-extent" id="Front-End">
<div class="nav-panel">
<p>
Next: <a href="Back-End.html" accesskey="n" rel="next">Anatomy of a Target Back End</a>, Previous: <a href="Documentation.html" accesskey="p" rel="prev">Building Documentation</a>, Up: <a href="gcc-Directory.html" accesskey="u" rel="up">The <samp class="file">gcc</samp> Subdirectory</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="Anatomy-of-a-Language-Front-End"><span>6.3.8 Anatomy of a Language Front End<a class="copiable-link" href="#Anatomy-of-a-Language-Front-End"> &para;</a></span></h4>

<p>A front end for a language in GCC has the following parts:
</p>
<ul class="itemize mark-bullet">
<li>A directory <samp class="file"><var class="var">language</var></samp> under <samp class="file">gcc</samp> containing source
files for that front end.  See <a class="xref" href="Front-End-Directory.html">The Front End
<samp class="file"><var class="var">language</var></samp> Directory</a>, for details.
</li><li>A mention of the language in the list of supported languages in
<samp class="file">gcc/doc/install.texi</samp>.
</li><li>A mention of the name under which the language&rsquo;s runtime library is
recognized by <samp class="option">--enable-shared=<var class="var">package</var></samp> in the
documentation of that option in <samp class="file">gcc/doc/install.texi</samp>.
</li><li>A mention of any special prerequisites for building the front end in
the documentation of prerequisites in <samp class="file">gcc/doc/install.texi</samp>.
</li><li>Details of contributors to that front end in
<samp class="file">gcc/doc/contrib.texi</samp>.  If the details are in that front end&rsquo;s
own manual then there should be a link to that manual&rsquo;s list in
<samp class="file">contrib.texi</samp>.
</li><li>Information about support for that language in
<samp class="file">gcc/doc/frontends.texi</samp>.
</li><li>Information about standards for that language, and the front end&rsquo;s
support for them, in <samp class="file">gcc/doc/standards.texi</samp>.  This may be a
link to such information in the front end&rsquo;s own manual.
</li><li>Details of source file suffixes for that language and <samp class="option">-x
<var class="var">lang</var></samp> options supported, in <samp class="file">gcc/doc/invoke.texi</samp>.
</li><li>Entries in <code class="code">default_compilers</code> in <samp class="file">gcc.cc</samp> for source file
suffixes for that language.
</li><li>Preferably testsuites, which may be under <samp class="file">gcc/testsuite</samp> or
runtime library directories.  FIXME: document somewhere how to write
testsuite harnesses.
</li><li>Probably a runtime library for the language, outside the <samp class="file">gcc</samp>
directory.  FIXME: document this further.
</li><li>Details of the directories of any runtime libraries in
<samp class="file">gcc/doc/sourcebuild.texi</samp>.
</li><li>Check targets in <samp class="file">Makefile.def</samp> for the top-level <samp class="file">Makefile</samp>
to check just the compiler or the compiler and runtime library for the
language.
</li></ul>

<p>If the front end is added to the official GCC source repository, the
following are also necessary:
</p>
<ul class="itemize mark-bullet">
<li>At least one Bugzilla component for bugs in that front end and runtime
libraries.  This category needs to be added to the Bugzilla database.
</li><li>Normally, one or more maintainers of that front end listed in
<samp class="file">MAINTAINERS</samp>.
</li><li>Mentions on the GCC web site in <samp class="file">index.html</samp> and
<samp class="file">frontends.html</samp>, with any relevant links on
<samp class="file">readings.html</samp>.  (Front ends that are not an official part of
GCC may also be listed on <samp class="file">frontends.html</samp>, with relevant links.)
</li><li>A news item on <samp class="file">index.html</samp>, and possibly an announcement on the
<a class="email" href="mailto:gcc-announce@gcc.gnu.org">gcc-announce@gcc.gnu.org</a> mailing list.
</li><li>The front end&rsquo;s manuals should be mentioned in
<samp class="file">maintainer-scripts/update_web_docs_git</samp> (see <a class="pxref" href="Texinfo-Manuals.html">Texinfo Manuals</a>)
and the online manuals should be linked to from
<samp class="file">onlinedocs/index.html</samp>.
</li><li>Any old releases or CVS repositories of the front end, before its
inclusion in GCC, should be made available on the GCC web site at
<a class="uref" href="https://gcc.gnu.org/pub/gcc/old-releases/">https://gcc.gnu.org/pub/gcc/old-releases/</a>.
</li><li>The release and snapshot script <samp class="file">maintainer-scripts/gcc_release</samp>
should be updated to generate appropriate tarballs for this front end.
</li><li>If this front end includes its own version files that include the
current date, <samp class="file">maintainer-scripts/update_version</samp> should be
updated accordingly.
</li></ul>


<ul class="mini-toc">
<li><a href="Front-End-Directory.html" accesskey="1">The Front End <samp class="file"><var class="var">language</var></samp> Directory</a></li>
<li><a href="Front-End-Config.html" accesskey="2">The Front End <samp class="file">config-lang.in</samp> File</a></li>
<li><a href="Front-End-Makefile.html" accesskey="3">The Front End <samp class="file">Make-lang.in</samp> File</a></li>
</ul>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Back-End.html">Anatomy of a Target Back End</a>, Previous: <a href="Documentation.html">Building Documentation</a>, Up: <a href="gcc-Directory.html">The <samp class="file">gcc</samp> Subdirectory</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
